package com.ruoyi.back.domain.v3

import com.baomidou.mybatisplus.annotation.IdType
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import com.ruoyi.app.common.Data
import com.ruoyi.back.enums.PayStatusEnum
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import org.apache.ibatis.annotations.Mapper
import java.util.*
import javax.persistence.*

@TableName("fly_my_record")
@ApiModel("我的作品记录")
@Table(name = "fly_my_record")
@Entity
data class MyRecord(

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(type = IdType.AUTO)
    var id: Long? = null,

    @ApiModelProperty("创建者Id")
    var userId: Long? = null,

    @ApiModelProperty("创建者名称")
    var username: String? = null,

    @ApiModelProperty("创建者编号")
    var userInfoId: String? = null,

    @ApiModelProperty("父类id")
    var pid: Long? = null,

    @ApiModelProperty("风格类型 1.文生图 2.图生图 3.头像变卡通")
    var type: Int? = StyleTypeEnum.TEXT_PIC.type,

    @ApiModelProperty("风格名称")
    var name: String? = null,

    @ApiModelProperty("图生图上传图片")
    var initPic: String? = null,

    @ApiModelProperty("尺寸信息")
    var resultConfig: String? = null,

    @ApiModelProperty("生成的图片")
    var pics: String? = null,

    @ApiModelProperty("描述词")
    var descText: String? = null,

    @ApiModelProperty("点赞数")
    var likeNum: Int? = 0,

    @ApiModelProperty("收藏数")
    var collectNum: Int? = 0,

    @ApiModelProperty("任务id")
    var taskId: String? = null,

    @ApiModelProperty("0或1。\"1\"表示已生成完成，\"0\"表示任务排队中或正在处理 2表示创建失败。")
    var status: Int? = 1,

    @ApiModelProperty("错误描述")
    var errorMsg: String? = null,

    @ApiModelProperty("是否推荐")
    var recommend: Boolean? = false,

    @ApiModelProperty("审核状态")
    var recommendStatus: Int? = CheckStatusEnum.PRE_CHECK.type,

    @ApiModelProperty("是否上架")
    var shelves: Boolean? = false,

    @ApiModelProperty("是否是管理员创建")
    var admin: Boolean? = false,

    @ApiModelProperty("上架日期")
    var shelvesTime: Date? = null,

    @ApiModelProperty("是否置顶")
    var top: Boolean? = false,

    @ApiModelProperty("是否推荐到banner")
    var recommendBanner: Boolean? = false,

    @ApiModelProperty("创建时间")
    var createTime: Date? = Date()
)



